package com.example.administrator.myapplication;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;

/**
 * Created by Administrator on 2016/4/1 0001.
 */
public class MyReceiver2 extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent) {
        String msg = intent.getStringExtra("msg");
        System.out.println("MyReceiver2接收到广播:"+msg);
        //得到优先级高的额外给的数据
        System.out.println("getResultData():"+getResultData());
        Bundle bdl = getResultExtras(true);
        System.out.println("bdl.getString msg1:"+bdl.getString("msg1"));;
        abortBroadcast();
    }
}
